package com.song.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.concurrent.TimeUnit;

/**
 * @Author Klys
 * @Date 2022/6/15 10:04
 * @Version 1.0
 */
@Component
//@FeignClient("cloud-provider-hystrix-payment")
//客户端实现服务降级的配置，服务调用失败统一在客户端做处理
@FeignClient(value = "cloud-provider-hystrix-payment",fallback = PaymentFeignServiceImpl.class)
public interface PaymentFeignService {

    @GetMapping(value = "/payment/hystrix/ok/1")
    public String test();

    @GetMapping(value = "/payment/hystrix/timeout/1")
    public String timeout();
}
